package com.flida.bana.jobs.task;

import com.flida.echart.core.api.order.service.GateOrderService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Created by yzc on 2016/12/17.
 */
@Component
public class EchartCoreJob {
    @Resource
    private GateOrderService gateOrderService;

    /**
     * vip会员
     * 每20分钟更新一次。
     * @throws Exception
     */
    @Scheduled(cron = "0 0/15 * * * ?")
    public  void  autoAddOrderM(){
        gateOrderService.autoAddOrderM();
    }
    /**
     * 黄金会员
     * 每20分钟更新一次。
     * @throws Exception
     */
    @Scheduled(cron = "0 0/10 * * * ?")
    public  void  autoAddOrderH(){
        gateOrderService.autoAddOrderH();
    }
    /**
     * 临时会员
     * 每50分钟更新一次。
     * @throws Exception
     */
    @Scheduled(cron = "0 0/30 * * * ?")
    public  void  autoAddOrderL(){
        gateOrderService.autoAddOrderM();
    }
}
